﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

public partial class control_client_listnews : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            try
            {
                DataView dv = new DataView();
                DataTable dt = new DataTable();
                dv = dsnews.Select(DataSourceSelectArguments.Empty) as DataView;
                dt = dv.ToTable();
                
                listpager.DataSource = dt.DefaultView;
                listpager.BindToControl = list;
                list.DataSource = listpager.DataSourcePaged;
                list.DataBind();
                count.Text = listpager.PageCount.ToString();
            }
            catch (Exception ex)
            { }
        }
    }
}